package com.xcdh.commons.utils;

import com.xcdh.domain.Validate;
import com.xcdh.domain.vo.PageVO;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Supplier;

public class ValidateUtil {
    public static <T> void  validate(Collection<T> elements , Consumer<T> consumer){
        for (T element : elements) {
            consumer.accept(element);
        }
    }

    public static <T> Validate notNull(Supplier<T> supplier , String msg){
        return new Validate().notNull(supplier ,msg ) ;
    }

    public static <T> Validate notVoid(Supplier<T> supplier , String msg){
        return new Validate().notVoid(supplier ,msg ) ;
    }

    public static <T> Validate notNull(Collection<T> elements , String msg){
        return new Validate().notNull(elements ,msg) ;
    }

    public static Validate notNull(Object value , String msg){
        return new Validate().notNull(value ,msg) ;
    }

    public static void main(String[] args) {

    }



}
